****APPENDIX FIGURE E2****

cd "$main_dir/output/figures/appendix_e"

graph set window fontface "Palatino"

//--------------------------------------------------------
//Create Figure E2
//--------------------------------------------------------

clear
use "$data_dir/clean/shp_cohort_panel.dta"

drop if cohort=="2000s"
																
//2000
scatter trust_fed_govt_med chrt_wgrowth_rate_1 if survey_year==2000 & chrt_total>=50 & chrt_total!=., mlabposition(9) mlabsize(large) mlabel(cohort) mlabcolor(black) xtitle(Average Lifetime Growth Experience) || ///
	lfit trust_fed_govt_med chrt_wgrowth_rate_1 if survey_year==2000 & chrt_total>=50 & chrt_total!=., title(2000, color(black) size(huge)) graphregion(color(white)) bgcolor(white) ///
	xlabel(0.021(0.001)0.024,labs(medium)) xtitle("Average Growth Experience", margin(small) size(medium)) ///
	ylabel(0.56(0.025)0.66,labs(medium) format(%9.2f)) ytitle("Trust in the Federal Government", margin(small) size(medium)) legend(off)
graph export "figure_e2_a.png", replace

//2020												
scatter trust_fed_govt_med chrt_wgrowth_rate_1 if survey_year==2020 & chrt_total>=50 & chrt_total!=. & cohort=="1990s", ///
	mlabposition(3) msymbol(T) mlabsize(large) mlabel(cohort) mlabcolor(black) mcolor(navy) || ///
	lfit trust_fed_govt_med chrt_wgrowth_rate_1 if survey_year==2020 & chrt_total>=50 & chrt_total!=. || ///
	scatter trust_fed_govt_med chrt_wgrowth_rate_1 if survey_year==2020 & chrt_total>=50 & chrt_total!=. & cohort!="1990s", mlabposition(3) mlabsize(large) mlabel(cohort) mlabcolor(black) mcolor(navy) ///
	lcolor(maroon) title(2020, color(black) size(huge)) graphregion(color(white)) bgcolor(white) ///
	xlabel(0.018(0.002)0.023,labs(medium)) xtitle("Average Growth Experience", margin(small) size(medium)) ///
	ylabel(,labs(medium) format(%9.2f)) ytitle("Trust in the Federal Government", margin(small) size(medium)) legend(off)
graph export "figure_e2_b.png", replace	
